package com.sheep.api.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/3/28.
 */
public class TreeNodeBean  implements Serializable {
    private String path = "";
    private List<TreeNodeBean> children = new ArrayList<TreeNodeBean>();
    private TreeNodeBean parent = null;
    private boolean isDir = false;

    public boolean isDir() {
        return isDir;
    }

    public void setIsDir(boolean isDir) {
        this.isDir = isDir;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public List<TreeNodeBean> getChildren() {
        return children;
    }

    public void setChildren(List<TreeNodeBean> children) {
        this.children = children;
    }

    public TreeNodeBean getParent() {
        return parent;
    }

    public void setParent(TreeNodeBean parent) {
        this.parent = parent;
    }

    public String show() {
        String result = path + "\n";
        for (TreeNodeBean i : children) {
            result = result + "\n" + i.show();
        }
        return result;
    }
}

